<section>
  <h4>Single Selection Custom Search<!--单选自定搜索方法--></h4>
  <div class="row">
    <div class="col-md-5">
      <d-select
        [filterKey]="'name'"
        [(ngModel)]="currentOption1"
        [searchFn]="onSelectObject"
        [isSearch]="true"
        [searchPlaceholder]="'search options'"
      >
      </d-select>
    </div>
  </div>
  <div class="row">
    <div class="col-md-5">
      <pre>Current Select: {{ currentOption1 | json }}</pre>
    </div>
  </div>
</section>
<section>
  <h4>Multiple Selection Custom Search<!--多选自定搜索方法--></h4>
  <div class="row">
    <div class="col-md-5">
      <d-select
        [filterKey]="'name'"
        [(ngModel)]="currentOption2"
        [searchFn]="onSelectObject"
        [isSearch]="true"
        [multiple]="true"
        [searchPlaceholder]="'search options'"
        [ngModelOptions]="{ updateOn: 'blur' }"
        [dValidateRules]="[{ minlength: 3, message: 'at least select 3 options' }]"
      >
      </d-select>
    </div>
    <div class="col-md-5">
      <pre>Current Select: {{ currentOption2 | json }}</pre>
    </div>
  </div>
</section>
